import { createRouter, createWebHistory } from 'vue-router'
import Data from '@/views/Data.vue'
import MainFrame from "@/views/MainFrame.vue";
import User from "@/views/User.vue";
import Task from "@/views/Task.vue";
import TaskSystem from "@/views/TaskSystem.vue";
import TaskUser from "@/views/TaskUser.vue";


const routes = [

    // {
    //     path: '/',
    //     name: 'Main',
    //     component: MainFrame,
    //     redirect: '/data',
    //     children:[
    //         {path: 'data', name: 'data', component: Data},
    //         {path: 'user', name: 'user', component: User},
    //         {path: 'task', name: 'task', component: Task}
    //     ]
    // },
    {
        path: '/user',
        component: User,
    },
    {
        path: '/',
        component: Data,
    },
    {
        path: '/task',
        component: Task
    },
    {
        path: '/taskUser',
        component: TaskUser
    },
    {
        path: '/taskSystem',
        component: TaskSystem
    }
]
// 使用createRouter函数创建一个路由实例，并通过createWebHistory函数来创建一个浏览器历史记录模式
const router = createRouter({
    history: createWebHistory(),
    routes
})

export default router